package com.adjy.pathbuilders.objects;

import org.jbox2d.dynamics.contacts.Contact;

import com.adjy.pathbuilders.physics.PhysicalObject;
import com.adjy.pathbuilders.rendering.AnimationPack;
import com.adjy.pathbuilders.sounds.SoundManager;
import com.adjy.pathbuilders.world.GameEntity;
import com.adjy.pathbuilders.world.MainChar;

public class Drink extends GameEntity {
	
	public static final float[] SIZE = { 5, 5 };
	
	public Drink(int x, int y, AnimationPack ap) {
		// FIXME review these values
		super(GameEntityType.DRINK, x, y, SIZE[0], SIZE[1], ap, false, true, false);
		setAnimation("drink");
	}
	
	@Override
	public void hasStartedCollidingWith(PhysicalObject pObject, Contact contact) {
		if (pObject == null)
			return;
		if (pObject instanceof MainChar) {
			SoundManager.getInstance().playSoundEffect("drink");
			kill();			
		}
	}
}
